Skip to content

Refactor pipeline parameter options to seperate Options.java file - #4209

Merged
aasthabharill merged 18 commits into
mainfrom
options-refactor
Sep 7, 2026
Merged

Refactor pipeline parameter options to seperate Options.java file#4209
aasthabharill merged 18 commits into
mainfrom
options-refactor

Conversation

@aasthabharill

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.96%. Comparing base (256bdf5) to head (1eaf9cd).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...oud/teleport/v2/templates/DataStreamToSpanner.java 0.00% 2 Missing ⚠️
...ogle/cloud/teleport/v2/templates/GCSSpannerDV.java 0.00% 2 Missing ⚠️
...cloud/teleport/v2/templates/SpannerToSourceDb.java 0.00% 2 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4209      +/-   ##
============================================
+ Coverage     55.92%   61.96%   +6.04%     
+ Complexity     7483     3451    -4032     
============================================
  Files          1134      580     -554     
  Lines         70175    34882   -35293     
  Branches       8023     3878    -4145     
============================================
- Hits          39248    21616   -17632     
+ Misses        28380    12157   -16223     
+ Partials       2547     1109    -1438     
Components Coverage Δ
spanner-templates 84.72% <0.00%> (+0.01%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 88.66% <0.00%> (-0.03%) ⬇️
spanner-live-reverse-replication 81.38% <0.00%> (-0.03%) ⬇️
spanner-bulk-migration 89.07% <ø> (-0.01%) ⬇️
gcs-spanner-dv 87.99% <0.00%> (+0.07%) ⬆️
Files with missing lines Coverage Δ
...oud/teleport/v2/templates/DataStreamToSpanner.java 88.15% <0.00%> (-0.31%) ⬇️
...ogle/cloud/teleport/v2/templates/GCSSpannerDV.java 14.63% <0.00%> (+14.63%) ⬆️
...cloud/teleport/v2/templates/SpannerToSourceDb.java 8.58% <0.00%> (-0.04%) ⬇️

... and 571 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aasthabharill aasthabharill changed the title Options refactor Refactor pipeline parameter options to seperate Options.java file Sep 2, 2026
@aasthabharill aasthabharill added the improvement Making existing code better label Sep 2, 2026
@aasthabharill
aasthabharill marked this pull request as ready for review September 2, 2026 08:40
@aasthabharill
aasthabharill requested a review from a team as a code owner September 2, 2026 08:40
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the configuration options for several Dataflow templates by moving them into dedicated Java files. This change enhances code organization and maintainability by decoupling the pipeline configuration definitions from the core template implementation logic.

Highlights

  • Modularization of Pipeline Options: Extracted pipeline configuration options into dedicated interfaces for DataStreamToSpanner, GCSSpannerDV, and SpannerToSourceDb templates.
  • Template Refactoring: Updated template classes and their corresponding unit tests to utilize the newly created options interfaces instead of local inner interfaces.
  • Build Configuration: Updated pom.xml to exclude the new template option classes from code coverage reports.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the pipeline options for the DataStreamToSpanner, GCSSpannerDV, and SpannerToSourceDb templates by extracting their inner Options interfaces into dedicated classes under a shared options package. Feedback on these changes highlights that excluding these core template classes from code coverage in pom.xml is highly discouraged and out of scope. Additionally, there are duplicate and non-sequential order values in the template parameters of DataStreamToSpannerOptions.java that need to be corrected.

Comment thread pom.xml Outdated
@aasthabharill
aasthabharill merged commit 8533021 into main Sep 7, 2026
37 of 39 checks passed
@aasthabharill
aasthabharill deleted the options-refactor branch September 7, 2026 03:18
aasthabharill added a commit that referenced this pull request Sep 7, 2026
)

* yml file

* yml file

* changes

* Refactor DataStreamToSpannerOptions to
separate file

* Delete .github/workflows/codelab-watchdog.yml

* Refactor SpannerToSourceDbOptions to separate file

* mistakes

* Refactor GCSSpannerDVOptions to a separate file

* spotless

* Fix checkstyle formatting and missing package-info

* year

* year

* fix tests

* fix tests

* testing

* spotless

* Fix test compilation failures in SpannerToSourceDbTest

* spotless
aasthabharill added a commit that referenced this pull request Sep 7, 2026
* yml file

* yml file

* changes

* deps: update Python dependencies (#4194)

Co-authored-by: liferoad <7833268+liferoad@users.noreply.github.com>

* [SpannerToSourceDb] Reverse replication Integration test with SSL based connection (#4192)

* [SpannerToSourceDb] Reverse replication Integration test with SSL based connection

* Moving process creation code into a method

* Addressing comments

* add auto-close dependabot step for requirements*.txt type files (#4220)

* add auto-close dependabot step

* add ignore comment

* add delta lake to iceberg blueprint and IT (#4103)

* add delta lake to iceberg IT

* fix spotless and rerun auto-generation

* switch to interrupt call

* change to a dynamic import to fix error

* add forgotten yaml definition file

* add generated README for DeltaLakeToIceberg template

* switch back to stop method for direct runner

* address gemini comment

* spotless

* initial comments fixes

* change iceberg to lakehouse

* change to a wrapped writetoiceberg via writetolakehouse

* update yaml file with wrapper transform

* remove old writetolakehouse transform idea

* spotless

* change to renamed transform

* address Delta client comment

* spotless

* fix generated file

* create write to lakehouse

* change package

* oops - used wrong assumed date

* fix uri catalog version

* update jar to to be the same

* change to managed and mimic deltalake

* update one more version jar

* add manifest resource transformer

* add managed and iceberg

* change pattern

* force to schemaAwareExternalTransform

* another try

* add transformer

* update per Cham's comments

* fix formatting

* fix naming determination (#4210)

* fix naming

* fix default imports issue

* rerun some checks

* clean up old named files

* change pubsubtoiceberg yaml name

* update readme with blueprint naming conventions

* Refactor pipeline parameter options to seperate Options.java file (#4209)

* yml file

* yml file

* changes

* Refactor DataStreamToSpannerOptions to
separate file

* Delete .github/workflows/codelab-watchdog.yml

* Refactor SpannerToSourceDbOptions to separate file

* mistakes

* Refactor GCSSpannerDVOptions to a separate file

* spotless

* Fix checkstyle formatting and missing package-info

* year

* year

* fix tests

* fix tests

* testing

* spotless

* Fix test compilation failures in SpannerToSourceDbTest

* spotless

* change+test

* revert test changes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: liferoad <7833268+liferoad@users.noreply.github.com>
Co-authored-by: darshan-sj <darshan-sj@users.noreply.github.com>
Co-authored-by: Derrick Williams <derrickaw@google.com>
pratickchokhani pushed a commit to pratickchokhani/DataflowTemplates that referenced this pull request Sep 7, 2026
…ogleCloudPlatform#4209)

* yml file

* yml file

* changes

* Refactor DataStreamToSpannerOptions to
separate file

* Delete .github/workflows/codelab-watchdog.yml

* Refactor SpannerToSourceDbOptions to separate file

* mistakes

* Refactor GCSSpannerDVOptions to a separate file

* spotless

* Fix checkstyle formatting and missing package-info

* year

* year

* fix tests

* fix tests

* testing

* spotless

* Fix test compilation failures in SpannerToSourceDbTest

* spotless
pratickchokhani pushed a commit to pratickchokhani/DataflowTemplates that referenced this pull request Sep 7, 2026
…ogleCloudPlatform#4209)

* yml file

* yml file

* changes

* Refactor DataStreamToSpannerOptions to
separate file

* Delete .github/workflows/codelab-watchdog.yml

* Refactor SpannerToSourceDbOptions to separate file

* mistakes

* Refactor GCSSpannerDVOptions to a separate file

* spotless

* Fix checkstyle formatting and missing package-info

* year

* year

* fix tests

* fix tests

* testing

* spotless

* Fix test compilation failures in SpannerToSourceDbTest

* spotless
pratickchokhani pushed a commit to pratickchokhani/DataflowTemplates that referenced this pull request Sep 7, 2026
…#4206)

* yml file

* yml file

* changes

* deps: update Python dependencies (GoogleCloudPlatform#4194)

Co-authored-by: liferoad <7833268+liferoad@users.noreply.github.com>

* [SpannerToSourceDb] Reverse replication Integration test with SSL based connection (GoogleCloudPlatform#4192)

* [SpannerToSourceDb] Reverse replication Integration test with SSL based connection

* Moving process creation code into a method

* Addressing comments

* add auto-close dependabot step for requirements*.txt type files (GoogleCloudPlatform#4220)

* add auto-close dependabot step

* add ignore comment

* add delta lake to iceberg blueprint and IT (GoogleCloudPlatform#4103)

* add delta lake to iceberg IT

* fix spotless and rerun auto-generation

* switch to interrupt call

* change to a dynamic import to fix error

* add forgotten yaml definition file

* add generated README for DeltaLakeToIceberg template

* switch back to stop method for direct runner

* address gemini comment

* spotless

* initial comments fixes

* change iceberg to lakehouse

* change to a wrapped writetoiceberg via writetolakehouse

* update yaml file with wrapper transform

* remove old writetolakehouse transform idea

* spotless

* change to renamed transform

* address Delta client comment

* spotless

* fix generated file

* create write to lakehouse

* change package

* oops - used wrong assumed date

* fix uri catalog version

* update jar to to be the same

* change to managed and mimic deltalake

* update one more version jar

* add manifest resource transformer

* add managed and iceberg

* change pattern

* force to schemaAwareExternalTransform

* another try

* add transformer

* update per Cham's comments

* fix formatting

* fix naming determination (GoogleCloudPlatform#4210)

* fix naming

* fix default imports issue

* rerun some checks

* clean up old named files

* change pubsubtoiceberg yaml name

* update readme with blueprint naming conventions

* Refactor pipeline parameter options to seperate Options.java file (GoogleCloudPlatform#4209)

* yml file

* yml file

* changes

* Refactor DataStreamToSpannerOptions to
separate file

* Delete .github/workflows/codelab-watchdog.yml

* Refactor SpannerToSourceDbOptions to separate file

* mistakes

* Refactor GCSSpannerDVOptions to a separate file

* spotless

* Fix checkstyle formatting and missing package-info

* year

* year

* fix tests

* fix tests

* testing

* spotless

* Fix test compilation failures in SpannerToSourceDbTest

* spotless

* change+test

* revert test changes

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: liferoad <7833268+liferoad@users.noreply.github.com>
Co-authored-by: darshan-sj <darshan-sj@users.noreply.github.com>
Co-authored-by: Derrick Williams <derrickaw@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Making existing code better size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants